* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

/* 提示条样式 */
.prompt-section {
    font-size: 18px;
}

.highlight {
    color: #e74c3c;
    font-weight: bold;
    font-size: 24px;
    transition: all 0.5s ease;
}

/* 单词显示区域样式 */
.word-section {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 20px 0;
    min-height: 120px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: relative;
}

.word {
    width: 33.33%;
    padding: 10px 15px;
    text-align: center;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    transition: all 0.3s ease;
}

.prev-word, .next-word {
    color: #7f8c8d;
    font-size: 18px;
}

.current-word {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
    z-index: 1;
}

/* 波形条样式 */
.waveform-section {
    height: 200px;
    position: relative;
    overflow: hidden;
}

#waveform {
    height: 150px;
    background-color: #f9f9f9;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

#waveform canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.time-indicators {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* 按钮区样式 */
.button-section {
    display: flex;
    justify-content: space-around;
    padding: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    background-color: #3498db;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.record-btn {
    background-color: #e74c3c;
    padding: 15px 30px;
    font-size: 18px;
}

.record-btn:hover {
    background-color: #c0392b;
}

.record-btn.recording {
    background-color: #27ae60;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

/* 提示区样式 */
.hint-section {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

/* 进度条样式 */
#progress-container {
    margin-top: 30px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #3498db;
    width: 0%;
    transition: width 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .word-section {
        flex-direction: column;
        padding: 15px;
    }
    
    .current-word {
        font-size: 24px;
    }
    
    .button-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
}

/* 加载指示器 */
.loading-indicator {
    padding: 10px;
    color: #e74c3c;
    font-weight: bold;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 10px 20px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 80%;
    text-align: center;
    pointer-events: none;
}

.message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.message.success {
    background-color: #2ecc71;
}

.message.error {
    background-color: #e74c3c;
}

.message.info {
    background-color: #3498db;
}

.message.warning {
    background-color: #f39c12;
}

/* 恢复对话框强制定位样式 */
.restore-dialog {
    position: fixed !important;
    top: 50px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 0 !important;
    z-index: 999999 !important;
    background: white !important;
    padding: 25px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
    max-width: 450px !important;
    width: 90% !important;
    text-align: center !important;
}

/* 必须添加在页面顶部的遮罩层 */
.restore-dialog::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

/* 恢复对话框内的段落样式 */
.restore-dialog > p {
    margin-bottom: 25px !important;
    font-size: 18px !important;
    font-weight: bold !important;
}

/* 确保按钮容器水平居中 */
.restore-dialog > div {
    display: flex !important;
    justify-content: center !important;
    gap: 15px !important;
}

/* 确保按钮样式统一 */
.restore-dialog .btn {
    padding: 12px 20px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    font-size: 16px !important;
    border: none !important;
    cursor: pointer !important;
} 